<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class HttpUtility</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> HttpUtility</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">http-request class that does GET and POST (and even SSL) and has no dependencies</p>
	<ul class="tags">
				<li><span class="field">author:</span> mnt@codeninja.de</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_kata---lib---utilities---httputility.php.html">/kata/lib/utilities/httputility.php</a> (line <span class="field">19</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#TYPE_GET" title="details" class="const-name">TYPE_GET</a> = 					<span class="var-type"> 1</span>

				</div>
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#TYPE_HEAD" title="details" class="const-name">TYPE_HEAD</a> = 					<span class="var-type"> 3</span>

				</div>
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#TYPE_POST" title="details" class="const-name">TYPE_POST</a> = 					<span class="var-type"> 2</span>

				</div>
							</div>
		</div>
	</div>


	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
									<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#doRequest" title="details" class="method-name">doRequest</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$postVars</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">mixed</span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#getReturnHeaders" title="details" class="method-name">getReturnHeaders</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">int</span>
										<a href="#getStatus" title="details" class="method-name">getStatus</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">mixed</span>
										<a href="#head" title="details" class="method-name">head</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#parseCookies" title="details" class="method-name">parseCookies</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$s</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#parseHeaders" title="details" class="method-name">parseHeaders</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$headers</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">mixed</span>
										<a href="#post" title="details" class="method-name">post</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$postVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setFollowRedirects" title="details" class="method-name">setFollowRedirects</a>
											(<span class="var-type">bool</span>&nbsp;<span class="var-name">$follow</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setRemembercookies" title="details" class="method-name">setRemembercookies</a>
											(<span class="var-type">bool</span>&nbsp;<span class="var-name">$remember</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methoddoRequest" id="doRequest"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">doRequest</span> (line <span class="line-number">102</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">actual wrapper</p>
	<ul class="tags">
				<li><span class="field">return:</span> html</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			doRequest
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$postVars</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$type</span><span class="var-description">: see TYPE_ consts. get/post/head</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$getVars</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$postVars</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$headers</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget" id="get"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">get</span> (line <span class="line-number">50</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">do a GET request to given url. you dont have to encode get-parameters, just give it as array</p>
	<ul class="tags">
				<li><span class="field">return:</span> returns html or false if something went wrong (then ask lastError())</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: base-url to request to eg. http://example.com/foo/bar</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$getVars</span><span class="var-description">: optional get-parameters to append to url</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$headers</span><span class="var-description">: optional request-headers to add to request</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetReturnHeaders" id="getReturnHeaders"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getReturnHeaders</span> (line <span class="line-number">239</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">return all webserver-headers from the last request</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getReturnHeaders
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetStatus" id="getStatus"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getStatus</span> (line <span class="line-number">222</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">returns the http-status code of the last request. 0 if we could not figure out status-code</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getStatus
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodhead" id="head"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">head</span> (line <span class="line-number">62</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">do a HEAD request to given url. you dont have to encode get-parameters, just give it as array</p>
	<ul class="tags">
				<li><span class="field">return:</span> returns html or false if something went wrong (then ask lastError())</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			head
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: base-url to request to eg. http://example.com/foo/bar</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$getVars</span><span class="var-description">: optional get-parameters to append to url</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$headers</span><span class="var-description">: optional request-headers to add to request</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseCookies" id="parseCookies"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">parseCookies</span> (line <span class="line-number">259</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			parseCookies
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$s</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$s</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseHeaders" id="parseHeaders"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">parseHeaders</span> (line <span class="line-number">243</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			parseHeaders
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$headers</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$headers</span>			</li>
				</ul>
		
			
	</div>
<a name="methodpost" id="post"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">post</span> (line <span class="line-number">75</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">do a GET request to given url. you dont have to encode get-parameters, just give it as array</p>
	<ul class="tags">
				<li><span class="field">return:</span> returns html or false if something went wrong (then ask lastError())</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			post
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$getVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$postVars</span> = <span class="var-default">false</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: base-url to request to eg. http://example.com/foo/bar</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$getVars</span><span class="var-description">: optional get-parameters to append to url</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$postVars</span><span class="var-description">: optional post-parameters to add to request</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$headers</span><span class="var-description">: optional request-headers to add to request</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetFollowRedirects" id="setFollowRedirects"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">setFollowRedirects</span> (line <span class="line-number">82</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setFollowRedirects
		</span>
					(<span class="var-type">bool</span>&nbsp;<span class="var-name">$follow</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$follow</span><span class="var-description">: whether or not to follow redirects like 301,303 etc.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetRemembercookies" id="setRemembercookies"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">setRemembercookies</span> (line <span class="line-number">89</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRemembercookies
		</span>
					(<span class="var-type">bool</span>&nbsp;<span class="var-name">$remember</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$remember</span><span class="var-description">: whether or not to remember cookies</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constTYPE_GET" id="TYPE_GET"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_GET</span>
			 = <span class="const-default"> 1</span>
			(line <span class="line-number">38</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
<a name="constTYPE_HEAD" id="TYPE_HEAD"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_HEAD</span>
			 = <span class="const-default"> 3</span>
			(line <span class="line-number">40</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
<a name="constTYPE_POST" id="TYPE_POST"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">TYPE_POST</span>
			 = <span class="const-default"> 2</span>
			(line <span class="line-number">39</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
						
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 23 Sep 2010 16:25:54 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>